227244
@@ -551,7 +551,7 @@
private SerDeUtils() {
   }
 
   public static Text transformTextToUTF8(Text text, Charset previousCharset) {
-    return new Text(new String(text.getBytes(), previousCharset));
+    return new Text(new String(text.getBytes(), 0, text.getLength(), previousCharset));
   }
 
   public static Text transformTextFromUTF8(Text text, Charset targetCharset) {
